A method called H.264/MPEG-4 AVC (hereinafter, simply referred to as “H.264”) is known as a method of coding and decoding moving pictures (Non-Patent Literature (NPL) 1). This method performs image compression through moving picture compression process such as frequency conversion, quantization and the like. Furthermore, the method adopts various entropy coding methods for reducing an amount of bits of a stream output relative to a code on which image compression has been performed.
In entropy coding methods, components of moving pictures may be used as contexts. H.264 adopts, as one of such entropy coding methods, context based variable length coding (VLC) scheme (section 9.2 in NPL 1) which switches between Huffman coding tables using contexts. H.264 further adopts, as another entropy coding method, an arithmetic coding method (section 9.3 in NPL 1) in which the value of a given variable is transformed into a binary string, and the probability of the value (0 or 1) of each element in the binary string is controlled using a context. In H.264, this arithmetic coding method, in which the probability of a binary value is given based on the context, is referred to as context-based adaptive binary arithmetic coding (CABAC).
In CABAC, a context is initialized on a per slice basis. More specifically, every time a slice which includes a current block to be coded or decoded changes, context variables for specifying the probability of the value of each element included in a binary string is initialized.